package com.base.common.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogUtil {

	private static Logger logger = LoggerFactory.getLogger(LogUtil.class);
	
	public static <T> void throwLocalError(RuntimeException e) {
		logger.error(e.getLocalizedMessage());
		throw e;
	}
	
	public static void throwError(String message, RuntimeException e) {
		logger.error(e.getMessage());
		throw e;
	}
	
	public static void error(String message, Exception e) {
		logger.error(message, e);
	}
	
	public static void info(String message, Exception e) {
		logger.error(message);
	}
}
